import logging
import time
import signal

import wmi
import common.codec_utils as codec_utils
from common.codec_utils import RSACipher
import common.date_utils as date_utils
import tkinter as tk
import tkinter.messagebox as messagebox

import configure.db_configure as db_configure
import configure.httpd_configure as httpd_configure
import listener.device_listener as device_listener


import starter

logging.basicConfig(format='%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s\t: %(message)s',level=logging.DEBUG)
starter.init()

alive=True

def quit():
    global alive
    print("ctrl+c")
    starter.release()
    alive=False

signal.signal(signal.SIGINT, quit)
signal.signal(signal.SIGTERM, quit)

while alive:
    time.sleep(1)